#include <iostream>
#include <queue>
#include <functional>
using namespace std;
//容器 优先队列
void my_priority_queue()
{
	priority_queue<int> p1;//默认是 最大值优先级队列 （由大到小出队）
	priority_queue<int, vector<int>, less<int>> p2;//最大值优先级队列
	priority_queue<int, vector<int>, greater<int>> p3;///最小值优先级队列(由小到大出队)
	p1.push(123);
	p1.push(102);
	p1.push(134);
	p1.push(36);
	p1.push(78);
	while ((p1.size() > 0))
	{
		cout << p1.top() << " ";
		p1.pop();//出队
	}
	cout << "\n";
	p3.push(123);
	p3.push(102);
	p3.push(134);
	p3.push(36);
	p3.push(78);
	while ((p3.size() > 0))
	{
		cout << p3.top() << " ";
		p3.pop();//出队
	}
}
void main7()
{
	my_priority_queue();
	system("pause");
	return;
}